package com.loong.system.model;

import com.loong.common.mybatis.entity.BaseEntity;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "system_letter")
public class SystemLetter extends BaseEntity {

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * 用户类型
     */
    @Column(name = "user_type")
    private Integer userType;

    /**
     * 发送时间
     */
    @Column(name = "send_time")
    private Date sendTime;

    /**
     * 接收时间
     */
    @Column(name = "receive_time")
    private Date receiveTime;

    /**
     * 阅读时间
     */
    @Column(name = "read_time")
    private Date readTime;

    /**
     * 是否已读
     */
    @Column(name = "is_read")
    private Boolean isRead;

    /**
     * 标签
     */
    private String tag;

    /**
     * 信件类型：0表示回复反馈，1表示系统发送的站内信
     */
    @Column(name = "letter_type")
    private Integer letterType;

    /**
     * 关联id：主要有系统发送站内信id和用户反馈id
     */
    @Column(name = "link_id")
    private Long linkId;

    /**
     * 发送人id
     */
    @Column(name = "sender_id")
    private Long senderId;

    /**
     * 发送人
     */
    private String sender;

    /**
     * 标题
     */
    private String title;

    /**
     * 内容
     */
    private String content;
}